home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3131 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.2 KB  |  37 lines

  1. Path: news.sara.nl!news
  2. From: "J.J.A. Koot" <sond0079>
  3. Newsgroups: comp.lang.c++
  4. Subject: friends within class
  5. Date: 22 Jan 1996 13:28:41 GMT
  6. Organization: Academic Computer Services Amsterdam (SARA)
  7. Message-ID: <4e03e9$o08@mira.sara.nl>
  8. NNTP-Posting-Host: horus.sara.nl
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1N (X11; I; AIX 2)
  13. X-URL: news:comp.lang.c++
  14.  
  15. Consider the follwing fragments of code:
  16. -------------------------------------------
  17. class foo {
  18.   class fooelement;
  19.   typedef fooelement* pointer;
  20. /*friend fooelement;*/
  21.   class fooelement {public: pointer ptr;};};
  22. void main(){};
  23. --------------------------------------------
  24.   class fooelement;
  25.   typedef fooelement* pointer;
  26.   class fooelement {public: pointer ptr;};
  27. void main(){};
  28. --------------------------------------------
  29. IMHO it is not nice that within a class
  30. the friend declaration is required.
  31. -- 
  32. ((lambda(x)(((((x x)x)x)x)x))(lambda(x)(lambda(y)(x(x y))))) greetings
  33. Jacob J. A. Koot,          Stichting Academisch Rekencentrum Amsterdam
  34. Tel: +31 20 5923019     Postbus 94613, 1090 GP, Amsterdam, Netherlands
  35. Fax: +31 20 6683167  WWW: http://www.sara.nl/koot E-mail: koot@sara.nl
  36.  
  37.